<template>
  <div class="news-list bg-c-fff pb70">
    <div class="fix container pt30">
      <div class="notice">
        <p class="dh"><a href="#/">首页</a> > <a href="#/notice-list">网站公告</a> > <span class="now"> 公告详情</span> </p>
        <div class="news-text">
          <h2 class="tc">{{title}}</h2>
          <div class="notice-box tc">
            <div class="dib">
              <i class="iconfont icon-yanjing vs"></i>
              <span>阅读：22</span>
            </div>
            <div class="dib">
              <i class="iconfont icon-shijian1 vm"></i>
              <span>时间：{{time}}</span>
            </div>
          </div>
          <div class="con" v-html="content"></div>
        </div>
      </div>
    </div>
  </div>
</template>
<script type="text/javascript">
export default {
  data() {
    return {
      title: '',
      time: '',
      content: ''
    }
  },
  mounted() {
    this.$http.get('/sysContent/detail/' + this.$route.query.id, {
      params: {
        id: this.$route.query.id
      }
    }).then(data => {
      if (data.data.httpCode === 200) {
        console.log(data.data.data)
        this.title = data.data.data.title
        this.time = data.data.data.createTime
        this.content = data.data.data.content
      } else {
        console.log(data.data.msg)
        this.$toasted.show(data.data.msg)
      }
    }).catch(err => {
      console.log(err)
    })
  }
}

</script>
<style type="text/css" scoped>
.pt30 {
  padding-top: 30px;
}

.dh a {
  color: #a6a6a6
}

.dh a.now {
  color: #454545;
}

.news-text {
  margin-top: 30px;
}

.news-text h2 {
  line-height: 55px;
  font-size: 30px;
}

.news-text .con {
  width: 850px;
  margin-top: 20px;
  font-size: 16px;
  color: #707070;
  line-height: 30px;
  text-indent: 32px;
}

.notice-box {
  color: #909090;
  margin-top: 18px;
  font-size: 12px;
  border-bottom: 1px dashed #ddd;
  padding-bottom: 25px;
}

.notice-box .dib {
  margin: 0 15px;
}

.notice-box .dib .icon-yanjing {
  font-size: 22px;
}

</style>
